package com.ly.common.core.domain.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ly.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 用户家庭成员及主要社会关系对象 erp_user_major_social_relation_info
 * @author wutao
 * @date 2024-05-29
 */
@TableName ("erp_user_major_social_relation_info")
@ApiModel (value = "erp_user_major_social_relation_info对象", description = "用户家庭成员及主要社会关系")
@Data
public class UserMajorSocialRelationEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId (value = "id", type = IdType.INPUT)
    private String id;

    /**
     * 用户Id
     */
    @ApiModelProperty ("用户Id")
    @TableField ("user_id")
    @Excel (name = "用户Id")
    private String userId;

    /**
     * 姓名
     */
    @ApiModelProperty ("姓名")
    @TableField ("user_name")
    @Excel (name = "姓名")
    private String userName;

    /**
     * 关系
     */
    @ApiModelProperty ("关系")
    @TableField ("relation")
    @Excel (name = "关系")
    private String relation;

    /**
     * 出生日期
     */
    @ApiModelProperty ("出生日期")
    @TableField ("birth_date")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date birthDate;

    /**
     * 职务
     */
    @ApiModelProperty ("职务")
    @TableField ("position")
    @Excel (name = "职务")
    private String position;

    /**
     * 电话
     */
    @ApiModelProperty ("电话")
    @TableField ("tel")
    @Excel (name = "电话")
    private String tel;

    /**
     * 地址
     */
    @ApiModelProperty ("地址")
    @TableField ("address")
    @Excel (name = "地址")
    private String address;

    /**
     * 是否可用
     */
    @ApiModelProperty ("是否可用")
    @TableField ("is_used")
    @Excel (name = "是否可用")
    private Integer isUsed;

    @Override
    public String toString () {
        return new ToStringBuilder ( this, ToStringStyle.MULTI_LINE_STYLE )
                .append ( "id", getId () )
                .append ( "userId", getUserId () )
                .append ( "userName", getUserName () )
                .append ( "relation", getRelation () )
                .append ( "birthDate", getBirthDate () )
                .append ( "position", getPosition () )
                .append ( "tel", getTel () )
                .append ( "address", getAddress () )
                .append ( "createBy", getCreateBy () )
                .append ( "createTime", getCreateTime () )
                .append ( "updateTime", getUpdateTime () )
                .append ( "isUsed", getIsUsed () )
                .toString ();
    }
}
